package com.qyzmt.mapper;

import com.qyzmt.pojo.IndexVideo;
import com.qyzmt.pojo.Volunteer;
import org.apache.ibatis.annotations.*;

@Mapper
public interface ManageSystemMapper {


    @Insert("insert into videos (video_src,name) values(#{video_src}, #{name}) ")
    int addVideo(IndexVideo indexVideo);

    @Update("UPDATE videos SET name=#{indexVideo.name}, video_src=#{indexVideo.video_src} WHERE id=#{id}")
    int updateVideo(int id, IndexVideo indexVideo);

    @Delete("delete from videos where id = #{id}")
    int deleteVideo(int id);

    @Delete("delete from volunteers where name = #{name} and connect_email = #{connect_email}")
    int deleteVolunteer(Volunteer volunteer);
}
